/*
** select_elem.c for zappy in /home/fassi_c//zappy2/zappouet/server/utils
**
** Made by clement fassi
** Login   <fassi_c@epitech.net>
**
** Started on  Wed Jun 29 12:01:06 2011 clement fassi
** Last update Wed Jun 29 12:01:08 2011 clement fassi
*/

int     select_elem(char *str, char *verif)
{
  int   i;
  int   j;

  i = 0;
  while (str[i])
    {
      j = 0;
      if (str[i] == verif[j])
        {
          while (str[i])
            {
              if (str[i] != verif[j] && verif[j] != '\n')
                break;
              i++;
              j++;
            }
	  if (verif[j] == '\0')
	    return (1);
        }
      if (str[i])
        i++;
    }
  return (0);
}
